{extend name="public:layout" /}
{block name="title"}集采管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> 集采列表</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <div class="pull-left">
                    <a class="btn btn-primary" href="{:url('add')}">
                        <i class="fa fa-plus"></i>&nbsp;申请集采
                    </a>
                </div>
                <div class="pull-right">
                    <form class="form-inline" method="post" id="searchForm">
                        <div class="form-group">
                            <select class="form-control" name="jicai_status">
                                <option value="-1" {eq name="query.jicai_status" value="-1"}selected{/eq}>所有</option>
                                <option value="0" {eq name="query.jicai_status" value="0"}selected{/eq}>审核中</option>
                                <option value="1" {eq name="query.jicai_status" value="1"}selected{/eq}>正常</option>
                                <option value="2" {eq name="query.jicai_status" value="2"}selected{/eq}>已结束</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <input class="form-control" name="goods_name" value="{$query.goods_name}" type="text" placeholder="活动商品">
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-info">
                                <i class="fa fa-search"></i> 搜索
                            </button>
                            <a class="btn btn-white" href="{:url('index')}">
                                <i class="fa fa-trash"></i> 清空
                            </a>
                        </div>
                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th width="50">#</th>
                    <th>分类</th>
                    <th>活动商品名称</th>
                    <th>集采价格</th>
                    <th>集采库存</th>
                    <th>集采销量</th>
                    <th>完成度</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.sku_id}</td>
                    <td>{$vo.class_name}</td>
                    <td>
                        <img src="{$vo.goods_thumb}" class="pull-left" style="width:32px;height:32px;margin:4px;" />
                        {$vo.goods_name} {$vo.sku_name}
                    </td>
                    <td>{$vo.jicai_price}元</td>
                    <td>{$vo.jicai_stock}</td>
                    <td>{$vo.jicai_sale}</td>
                    <td>
                        <small>当前进度:{$vo.progress} <a href="javascript:;" onclick="showDetail('{$vo.sku_id}')">详细</a></small>
                        <div class="progress progress-mini">
                            <div style="width: {$vo.progress};" class="progress-bar"></div>
                        </div>
                    </td>
                    <td>
                       {$vo.jicai_status_text}
                    </td>
                    <td>
                        {eq name="vo.jicai_status" value="0"}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认删除吗？" data-url="{:url('del')}" data-params="jicai_id={$vo.jicai_id}">删除</a>
                        {/eq}
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="page-bar">{$page}</div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
{/block}
{block name="script"}{/block}